<script setup>
defineProps({
  title: {
    required: true,
    type: String,
    default: '标题'
  }
})
</script>

<template>
  <el-card shadow="hover" style="max-width: 100%; margin: 20px; min-height: 90%">
    <template #header>
      <div class="card-header">
        <span>{{ title }}</span>
        <div>
          <slot name="header"></slot>
        </div>
      </div>
    </template>
    <slot></slot>
  </el-card>
</template>

<style scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
